﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MvcForum.Net.Business.Forum>" %>

<div id="_model" class="fr-widget">
    <div class="header">
        <span class="header-txt">Infomation</span>
    </div>
    <div class="collapse-panel">
        <%using (Html.BeginForm("ForumSave", "Admin", FormMethod.Post, new { @id="ForumF", @onRequest = "$.MvcForum.showLoading()", @onSuccess = "$.MvcForum.hideLoading()" }))
          {%>
        <%=Html.AntiForgeryTokenX("FORUMSAVE")%>
        <%=Html.HiddenFor(model=>model.ForumId) %>
        <table cellpadding="0" cellspacing="5" width="100%">
            <tr>
                <td class="width20">
                    Forum Name
                </td>
                <td>
                    <%=Html.TextBoxFor(model => model.ForumName, new { @class = "input {validate:{required:true}}" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Forum parent</strong><br />
                    Select a parent category or forum for this forum.
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Allow Roles</strong>
                </td>
                <td>
                    <%
                        //var _roles = Role.All(); %>
                   <%-- <select multiple="multiple" class="dd-converted width50" name="AllowRoles" id="AllowRoles" size="7">
                        <%foreach (var role in _roles)
                          {
                          
                        %>
                        <option value="<%=role.RoleId%>">
                            <%=role.RoleName%></option>
                        <%
                            }%>
                    </select>--%>

                   <%-- <%=Html.ListBox("AllowRoles",new MultiSelectList(_roles,"RoleId","RoleName",null),new {@class="dd-converted width50"})%>--%>
                </td>
            </tr>
            <tr>
                <td>
                    ModerateType
                </td>
                <td>
                    <%=Html.DropDownList("ModerateType", typeof(ModerateType), Model != null && Model.ModerateType != null ? (ModerateType)Model.ModerateType : ModerateType.None)%>
                </td>
            </tr>
            <tr>
                <td>
                    Keywords
                </td>
                <td>
                    <%=Html.TextAreaFor(model => model.Keywords, new { @style = "height:60px" })%>
                </td>
            </tr>
            <tr>
                <td>
                    SortOrder
                </td>
                <td>
                    <%=Html.TextBoxFor(model => model.SortOrder, new { @class = "input {validate:{required:true,digits:true}}" })%>
                </td>
            </tr>
            <tr>
                <td>
                    RemoteUrl
                </td>
                <td>
                    <%=Html.TextBoxFor(model => model.RemoteUrl, new { @class = "input {validate:{url:true}}" })%>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <%=Html.CheckBoxFor(model => model.IsLocked)%>
                    <%=Html.LabelFor(model=>model.IsLocked) %>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <%=Html.CheckBoxFor(model => model.AllowPostWithIn,new {@checked =true})%>
                    <label for="AllowPostWithIn">Allow Post within</label>

                   

                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <%=Html.CheckBoxFor(model => model.VisibleAtHomePage,new {@checked =true})%>
                    <%=Html.LabelFor(model=>model.VisibleAtHomePage) %>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Description
                </td>
                <td>
                    <%=Html.TextAreaFor(model => model.Description,new {@class="input tinymce",@style="height:60px",@mode="small"})%>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="button" value="Save" onclick="$.MvcForum.ajaxSubmit('ForumF')" class="button" />
                    <input type="reset" value="Reset" class="button" />
                </td>
            </tr>
        </table>
        <%
            }%>
    </div>
</div>
